import express from "express";
const app = express();

app.get("/todo", (req, res) => {
  res.json({
    code: 200,
    msg: "success",
    data: [
      { id: 1, thing: "橘子", done: false },
      { id: 2, thing: "西瓜", done: true },
      { id: 3, thing: "苹果", done: false },
    ],
  });
});

app.listen("8888", () => {
  console.log("服务器启动成功 请访问 http://localhost:8888");
});
